1. Field of the Invention
The present invention relates to an image processing method and an image processing apparatus, and particularly relates to an image processing method and an image processing apparatus in which a face area of a person in a pictorial image is detected and a correction is performed thereupon.
2. Description of the Related Art
Due to the spread of digital cameras and improvements in the capabilities of printers in recent years, there are increasing opportunities for ordinary users to print out in their own homes images they have captured. However, users who print out captured images as they are have been unable to obtain picture quality equivalent to that of a development, printing, and enlargement, or DPE, service, or an online print service that is provided by a professional business. The reason is that, with DPE and online print services, printing is carried out after executing appropriate corrections on the images captured by the user.
A particularly common target for corrections in captured images is persons in the images, and corrections are performed so that persons in the images are reproduced in fine detail. For example, backlight correction is carried out if an image is captured against a backlight, and corrections are carried out to achieve favorable skin colors for persons.
Such correction results can also be obtained by using commercially available applications. Commercially available applications include those that offer correction functions spanning a wide range of elements, including brightness, contrast, hue, saturation, etc. By combining and executing these correction items, corrections equivalent to those carried out by DPE and online print services can be achieved. However, it is difficult for an ordinary user to carry out complicated correction tasks such as these.
Consequently, methods have been proposed for automatically carrying out corrections related to image correction that gives importance to the persons in the images.
For example, techniques are known in which a skin color area or a face area of a person is detected from image signals, and luminance correction, color correction, and aperture correction are carried out on only the detected areas, for example see Japanese Patent Laid-Open Nos. H6-121332 and H11-146405. With these techniques, area extraction is carried out using skin color detection in order to adjudicate face detection and areas to be corrected.
Furthermore, color correction techniques are known in which digital image data, as photo images including human faces and skin areas, undergoes color correction so that the colors of human faces and skin areas are corrected to natural colors, and good color balance is achieved for the entire image as well, for example, see Japanese Patent Laid-Open No. 2002-044469.
Further still, methods are known in which face areas in an image are detected and color components of skin from the face areas are specified so that correction is carried out limited to only these face areas, and corrections are carried out on only those color components, for example, see Japanese Patent Laid-Open No. 2004-303193.
However, these conventional automatic correction techniques for persons in images have the following problems.
In methods in which skin color areas are detected, as in Japanese Patent Laid-Open Nos. H6-121332 and H11-146405, defining human skin colors has been difficult. In particular, there have been problems in that detection is not possible when there is a color cast in the image to be corrected or when there are skin color portions in the background that are also detected and undergo correction. Furthermore, with face areas, there are drastic changes in color, mainly in luminance, due to shadows and the like, and it has been difficult to uniformly specify skin colors of entire faces.
Furthermore, in methods in which the color balance of the entire image is obtained, such as that described in Japanese Patent Laid-Open No. 2002-044469, there has been a problem in that corrections limited to face areas cannot be carried out since the colors of the entire image undergo corrections.
Furthermore, in methods in which corrections limited to only face areas are carried out, such as that described in Japanese Patent Laid-Open No. 2004-303193, there has been a problem in that corrections extend to background areas as well, when the background in the vicinity of the face resembles the skin color determined from the face area.
Also, some commercially available applications are provided with a function that can automatically specify areas. With such applications, an area to be corrected is typically extended from a point specified by the user, subject to a condition that either the color components are the same, or the difference in the color components is within a predetermined range. However, since faces are not flat surfaces, there are areas in which comparatively drastic color variations occur within the captured images. Consequently, the methods for specifying areas to be corrected cannot accurately specify the range of face areas alone, unless the differences in color components as a condition are made small, and a large number of points are specified.